package day03;

public class OperDemo3 {
    public static void main(String[] args) {

        //逻辑运算符：&&，||，!
        int a = 5, b = 10, c = 5;
        /*
        boolean b1 = b >= a && b < c;//false
        System.out.println(b1);//false
        System.out.println(b <= c && b > a);//false
        System.out.println(a == b && c < b);//false
        System.out.println(b != c && a < b);//true

        int age = 40;
        System.out.println(age >= 18 && age <= 50);//true年龄在18-50之间
        int score = 80;
        System.out.println(score >= 0 && score <= 100);//true成绩在0-100之间
        */

        /*
        System.out.println(b>=a || b<c);//true
        System.out.println(b<=c||b>a);//true
        System.out.println(b!=c||a<b);//true
        System.out.println(a==b||b>c);//true
        int score = 900;
        System.out.println(score<0||score>100);//true
        System.out.println("------------");
        boolean b2 = !(a<b);//false
        System.out.println(b2);
        System.out.println(!(a>b));//false
         */

        /*
        boolean b3 = a>b && c++>2;
        System.out.println(b3);
        System.out.println(c);//5，发生短路

        boolean b4 = a>b || c++>2;
        System.out.println(b4);
        System.out.println(c);//5，发生短路
        */


    }
}
